package com.laboratory.miniolearning.service;

import com.laboratory.miniolearning.domin.UploadResult;
import io.minio.StatObjectResponse;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.InputStream;

public interface FileService {

    UploadResult upload(MultipartFile file, String dir);

    String buildObjectName(String dir, String fileName);

    String safeExt(String fileName);

    String normalizeDir(String dir);

    String pickContentType(String contentType, String fileName);

    InputStream download(String objectName);

    void downloadToFile(String objectName, File dest);

    void removeObjectName(String objectName);

    boolean exists(String objectName);

    StatObjectResponse statObject(String objectName);

}
